]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar-server: Fix a memory leak
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Jul 2016 15:50:35 +0000 (17:50 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Jul 2016 16:05:57 +0000 (18:05 +0200)
App will take ownership of the location string when the timezone
changes, but not when there was no change - free the memory in
that case.

https://bugzilla.gnome.org/show_bug.cgi?id=748226

src/calendar-server/gnome-shell-calendar-server.c

index f5b1e5f9d695448cebc234548c332371cd075c41..49f92ea22aee24ca4f13c052529aedeede70fadb 100644 (file)
@@ -526,6 +526,10 @@ app_update_timezone (App *app)
       app->timezone_location = location;
       print_debug ("Using timezone %s", app->timezone_location);
     }
+  else
+    {
+      g_free (location);
+    }
 }
 
 static gboolean